package com.study.spring.netty.time_client;

import java.nio.charset.StandardCharsets;

public class Request {

    private int length;
    private String question;

    public Request(String question) {
        this.length = question.getBytes(StandardCharsets.UTF_8).length;
        this.question = question;
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public String getQuestion() {
        return question;
    }

    public void setQuestion(String question) {
        this.question = question;
    }

    @Override
    public String toString() {
        return "Request{" +
                "length=" + length +
                ", question='" + question + '\'' +
                '}';
    }
}
